<template>
  <div class="title_layout">
    <div class="layout_text">{{ title || '标题' }}</div>
    <div class="layout_content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: ['title']
}
</script>

<style lang="less" scoped>
.title_layout {
  margin-bottom: 10px;

  .layout_text {
    height: 30px;
    line-height: 30px;
    font-size: 14px;
    font-weight: bold;
    position: relative;
    padding-left: 12px;
  }

  .layout_text::before {
    width: 4px;
    height: 18px;
    content: '';
    background-color: #1296db;
    position: absolute;
    left: 0;
    top: 6px;
  }

  .layout_content {
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
  }
}
</style>